<extend name="Public/base"/>
<block name="rightbox">
<div class="rightbox">
    <div class="block">
        <div class="navbar navbar-inner block-header">
            <div class="muted pull-left">{:isset($info['id'])?'编辑':'新增'}用户菜单</div>
        </div>
        <div class="block-content collapse in">
            <div class="span12">
                <form action="{:U()}" method="post" class="form-horizontal">
                    <fieldset>
                    <div class="control-group">
                        <label class="control-label">标题</label>
                        <div class="controls">
                            <input type="text" class="text input-large" name="title" value="{$info.title|default=''}">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">排序</label>
                        <div class="controls">
                            <input type="text" class="text input-small" name="sort" value="{$info.sort|default=0}">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">链接</label>
                        <div class="controls">
                            <input type="text" class="text input-large" name="url" value="{$info.url|default=''}">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">上级菜单</label>
                        <div class="controls">
                            <select name="pid">
                                <volist name="Menus" id="menu">
                                    <option value="{$menu.id}">{$menu.title_show}</option>
                                </volist>
                            </select>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">分组</label>
                        <div class="controls">
                            <input type="text" class="text input-large" name="group" value="{$info.group|default=''}">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">是否隐藏<span class="check-tips"></span></label>
                        <div class="controls">
                            <label class="radio"><input type="radio" name="hide" value="1">是</label>
                            <label class="radio"><input type="radio" name="hide" value="0">否</label>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">仅开发者模式可见<span class="check-tips"></span></label>
                        <div class="controls">
                            <label class="radio"><input type="radio" name="is_dev" value="1">是</label>
                            <label class="radio"><input type="radio" name="is_dev" value="0">否</label>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">说明</label>
                        <div class="controls">
                            <input type="text" class="text input-large" name="tip" value="{$info.tip|default=''}">
                        </div>
                    </div>
                    <div class="form-actions">
                        <input type="hidden" name="id" value="{$info.id|default=''}">
                        <button class="btn submit-btn btn-primary ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
                        <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
                    </div>
                    </fieldset>
                </form>
            </div>
        </div>
    </div>
</div>
</block>
<block name="script">
    <script type="text/javascript">
        Think.setValue("pid", {$info.pid|default = 0});
        Think.setValue("hide", {$info.hide|default = 0});
        Think.setValue("is_dev", {$info.is_dev|default = 0});
        //导航高亮
        highlight_subnav('{:U('index')}');
    </script>
</block>